#!/bin/bash

echo "=== 启动 RTAB-Map SLAM (采用验证过的配置) ==="

source /opt/ros/humble/setup.bash

ros2 launch rtabmap_launch rtabmap.launch.py \
    rtabmap_args:='--delete_db_on_start' \
    frame_id:=camera_link \
    rgb_topic:=/camera/camera/color/image_raw \
    depth_topic:=/camera/camera/depth/image_rect_raw \
    camera_info_topic:=/camera/camera/color/camera_info \
    approx_sync:=true \
    rtabmap_viz:=true \
    rviz:=true